﻿using System;
using System.Text.RegularExpressions;

class ReversesWOrdsInSentence
{
    static void Main()
    {
        string text = "C# is not C++, not PHP and not Delphi!";
        string[] split = text.Split(' ','.',',','!');
        string[] separators = text.Split(' ');

        for (int i = 0; i < separators.Length; i++)
        {
            separators[i] = Regex.Replace(separators[i], @"[^.,.!..]", String.Empty);
        }

        for (int i = 0; i < separators.Length; i++)
        {
            Console.Write(split[split.Length - 1 - i] + separators[i]+" ");
        }
        Console.WriteLine();
    }
}